﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ShareCodeList.ascx.cs"
    Inherits="BuXiaChu.OrderDishes.Web.Admin.Modules.ShareCode.ShareCodeList" %>
<table>
    <tr>
        <td>
            代码编码
        </td>
        <td>
            代码名称
        </td>
        <td>
            所属父类
        </td>
        <td>
            所属类别
        </td>
        <% if (ShowOp)
           {%>
        <td>
            操作
        </td>
        <%} %>
    </tr>
    <% foreach (var item in List)
       {%>
    <tr>
        <td>
            <%= item.CodeID %>
        </td>
        <td>
            <span>
                <%= item.Name %></span>
            <input type="text" style="display: none;" id="txt_update_<%=item.CodeID %>" size="30"
                maxlength="100" value="<%= item.Name %>" data-classid="<%=item.ClassID %>" data-pid="<%=item.ParentId %>" />
        </td>
        <td>
            <%= string.IsNullOrEmpty(ParentShareCode.Name) ? "无" : ParentShareCode.Name%>
        </td>
        <td>
            <%= ShareCodeClass.Name %>
        </td>
        <% if (ShowOp)
           {%>
        <td data-id="<%=item.CodeID %>">
            <a href="javascript:;" onclick="shareCodeManager.modify(this)" id="aModify<%=item.CodeID %>"
                opt="0">修改</a> <a href="javascript:;" onclick="shareCodeManager.del(this,<%= item.ClassID%>,<%= item.ParentId%>)"
                    id="aDelete<%=item.CodeID %>">删除</a> <a href="javascript:;" onclick="shareCodeManager.cancleClass(this)"
                        id="aCancle<%=item.CodeID %>" style="display: none">取消</a>
        </td>
        <td>
            <a href="ShareCode.aspx?classId=<%=item.ClassID %>&parentId=<%= item.CodeID%>">增加子类</a>
        </td>
        <%} %>
    </tr>
    <%} %>
</table>
